| Conditions | 3 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import {nc_fetch_json} from 'nextcloud_fetch'; |
||
| 25 | export function startVerification (gateway, identifier) { |
||
| 26 | let url = OC.generateUrl('/apps/twofactor_gateway/settings/{gateway}/verification/start', { |
||
| 27 | gateway: gateway |
||
| 28 | }) |
||
| 29 | |||
| 30 | return nc_fetch_json(url, { |
||
| 31 | method: 'POST', |
||
| 32 | body: JSON.stringify({ |
||
| 33 | identifier: identifier |
||
| 34 | }) |
||
| 35 | }).then(function (resp) { |
||
| 36 | if (resp.ok) { |
||
| 37 | return resp.json(); |
||
| 38 | } |
||
| 39 | throw resp; |
||
| 40 | }) |
||
| 41 | } |
||
| 42 | |||
| 75 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.